/**
 *
 */
import Util;
import OpenApi;

import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  

  checkConfig(config);
  @endpoint = getEndpoint('cloudphoto', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model ActivatePhotosRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model ActivatePhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model ActivatePhotosResponse = {
  headers: map[string]string(name='headers'),
  body: ActivatePhotosResponseBody(name='body'),
}

async function activatePhotosWithOptions(request: ActivatePhotosRequest, runtime: Util.RuntimeOptions): ActivatePhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ActivatePhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function activatePhotos(request: ActivatePhotosRequest): ActivatePhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return activatePhotosWithOptions(request, runtime);
}

model AddAlbumPhotosRequest {
  albumId?: long(name='AlbumId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model AddAlbumPhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model AddAlbumPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: AddAlbumPhotosResponseBody(name='body'),
}

async function addAlbumPhotosWithOptions(request: AddAlbumPhotosRequest, runtime: Util.RuntimeOptions): AddAlbumPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddAlbumPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addAlbumPhotos(request: AddAlbumPhotosRequest): AddAlbumPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAlbumPhotosWithOptions(request, runtime);
}

model CreateAlbumRequest {
  albumName?: string(name='AlbumName'),
  storeName?: string(name='StoreName'),
  remark?: string(name='Remark'),
  libraryId?: string(name='LibraryId'),
}

model CreateAlbumResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  album?: {
    idStr?: string(name='IdStr'),
    photosCount?: long(name='PhotosCount'),
    cover?: {
      remark?: string(name='Remark'),
      state?: string(name='State'),
      height?: long(name='Height'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      mtime?: long(name='Mtime'),
      ctime?: long(name='Ctime'),
      width?: long(name='Width'),
      md5?: string(name='Md5'),
      isVideo?: boolean(name='IsVideo'),
      title?: string(name='Title'),
      id?: long(name='Id'),
    }(name='Cover'),
    mtime?: long(name='Mtime'),
    ctime?: long(name='Ctime'),
    remark?: string(name='Remark'),
    state?: string(name='State'),
    name?: string(name='Name'),
    id?: long(name='Id'),
  }(name='Album'),
  code?: string(name='Code'),
}

model CreateAlbumResponse = {
  headers: map[string]string(name='headers'),
  body: CreateAlbumResponseBody(name='body'),
}

async function createAlbumWithOptions(request: CreateAlbumRequest, runtime: Util.RuntimeOptions): CreateAlbumResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateAlbum', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createAlbum(request: CreateAlbumRequest): CreateAlbumResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAlbumWithOptions(request, runtime);
}

model CreatePhotoRequest {
  fileId?: string(name='FileId'),
  sessionId?: string(name='SessionId'),
  uploadType?: string(name='UploadType'),
  photoTitle?: string(name='PhotoTitle'),
  storeName?: string(name='StoreName'),
  remark?: string(name='Remark'),
  libraryId?: string(name='LibraryId'),
  staging?: string(name='Staging'),
  shareExpireTime?: long(name='ShareExpireTime'),
  takenAt?: long(name='TakenAt'),
}

model CreatePhotoResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  photo?: {
    remark?: string(name='Remark'),
    takenAt?: long(name='TakenAt'),
    state?: string(name='State'),
    height?: long(name='Height'),
    shareExpireTime?: long(name='ShareExpireTime'),
    fileId?: string(name='FileId'),
    idStr?: string(name='IdStr'),
    ctime?: long(name='Ctime'),
    mtime?: long(name='Mtime'),
    width?: long(name='Width'),
    size?: long(name='Size'),
    md5?: string(name='Md5'),
    title?: string(name='Title'),
    isVideo?: boolean(name='IsVideo'),
    id?: long(name='Id'),
    location?: string(name='Location'),
  }(name='Photo'),
  code?: string(name='Code'),
}

model CreatePhotoResponse = {
  headers: map[string]string(name='headers'),
  body: CreatePhotoResponseBody(name='body'),
}

async function createPhotoWithOptions(request: CreatePhotoRequest, runtime: Util.RuntimeOptions): CreatePhotoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreatePhoto', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createPhoto(request: CreatePhotoRequest): CreatePhotoResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPhotoWithOptions(request, runtime);
}

model CreatePhotoStoreRequest {
  storeName?: string(name='StoreName'),
  defaultQuota?: long(name='DefaultQuota'),
  bucketName?: string(name='BucketName'),
  remark?: string(name='Remark'),
}

model CreatePhotoStoreResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model CreatePhotoStoreResponse = {
  headers: map[string]string(name='headers'),
  body: CreatePhotoStoreResponseBody(name='body'),
}

async function createPhotoStoreWithOptions(request: CreatePhotoStoreRequest, runtime: Util.RuntimeOptions): CreatePhotoStoreResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreatePhotoStore', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createPhotoStore(request: CreatePhotoStoreRequest): CreatePhotoStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPhotoStoreWithOptions(request, runtime);
}

model CreateTransactionRequest {
  size?: long(name='Size'),
  ext?: string(name='Ext'),
  force?: string(name='Force'),
  md5?: string(name='Md5'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model CreateTransactionResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  transaction?: {
    upload?: {
      objectKey?: string(name='ObjectKey'),
      accessKeySecret?: string(name='AccessKeySecret'),
      sessionId?: string(name='SessionId'),
      accessKeyId?: string(name='AccessKeyId'),
      stsToken?: string(name='StsToken'),
      ossEndpoint?: string(name='OssEndpoint'),
      bucket?: string(name='Bucket'),
      fileId?: string(name='FileId'),
    }(name='Upload'),
  }(name='Transaction'),
  code?: string(name='Code'),
}

model CreateTransactionResponse = {
  headers: map[string]string(name='headers'),
  body: CreateTransactionResponseBody(name='body'),
}

async function createTransactionWithOptions(request: CreateTransactionRequest, runtime: Util.RuntimeOptions): CreateTransactionResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateTransaction', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createTransaction(request: CreateTransactionRequest): CreateTransactionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTransactionWithOptions(request, runtime);
}

model DeleteAlbumsRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  albumId?: [ integer ](name='AlbumId'),
}

model DeleteAlbumsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model DeleteAlbumsResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteAlbumsResponseBody(name='body'),
}

async function deleteAlbumsWithOptions(request: DeleteAlbumsRequest, runtime: Util.RuntimeOptions): DeleteAlbumsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteAlbums', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteAlbums(request: DeleteAlbumsRequest): DeleteAlbumsResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAlbumsWithOptions(request, runtime);
}

model DeleteEventRequest {
  eventId?: long(name='EventId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model DeleteEventResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model DeleteEventResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteEventResponseBody(name='body'),
}

async function deleteEventWithOptions(request: DeleteEventRequest, runtime: Util.RuntimeOptions): DeleteEventResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteEvent', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteEvent(request: DeleteEventRequest): DeleteEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteEventWithOptions(request, runtime);
}

model DeleteFacesRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  faceId?: [ integer ](name='FaceId'),
}

model DeleteFacesResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model DeleteFacesResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteFacesResponseBody(name='body'),
}

async function deleteFacesWithOptions(request: DeleteFacesRequest, runtime: Util.RuntimeOptions): DeleteFacesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteFaces', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteFaces(request: DeleteFacesRequest): DeleteFacesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFacesWithOptions(request, runtime);
}

model DeletePhotosRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model DeletePhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model DeletePhotosResponse = {
  headers: map[string]string(name='headers'),
  body: DeletePhotosResponseBody(name='body'),
}

async function deletePhotosWithOptions(request: DeletePhotosRequest, runtime: Util.RuntimeOptions): DeletePhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeletePhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deletePhotos(request: DeletePhotosRequest): DeletePhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePhotosWithOptions(request, runtime);
}

model DeletePhotoStoreRequest {
  storeName?: string(name='StoreName'),
}

model DeletePhotoStoreResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model DeletePhotoStoreResponse = {
  headers: map[string]string(name='headers'),
  body: DeletePhotoStoreResponseBody(name='body'),
}

async function deletePhotoStoreWithOptions(request: DeletePhotoStoreRequest, runtime: Util.RuntimeOptions): DeletePhotoStoreResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeletePhotoStore', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deletePhotoStore(request: DeletePhotoStoreRequest): DeletePhotoStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePhotoStoreWithOptions(request, runtime);
}

model EditPhotosRequest {
  shareExpireTime?: long(name='ShareExpireTime'),
  takenAt?: long(name='TakenAt'),
  title?: string(name='Title'),
  remark?: string(name='Remark'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model EditPhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model EditPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: EditPhotosResponseBody(name='body'),
}

async function editPhotosWithOptions(request: EditPhotosRequest, runtime: Util.RuntimeOptions): EditPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('EditPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function editPhotos(request: EditPhotosRequest): EditPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return editPhotosWithOptions(request, runtime);
}

model EditPhotoStoreRequest {
  autoCleanEnabled?: string(name='AutoCleanEnabled'),
  autoCleanDays?: int32(name='AutoCleanDays'),
  defaultQuota?: long(name='DefaultQuota'),
  defaultTrashQuota?: long(name='DefaultTrashQuota'),
  remark?: string(name='Remark'),
  storeName?: string(name='StoreName'),
}

model EditPhotoStoreResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model EditPhotoStoreResponse = {
  headers: map[string]string(name='headers'),
  body: EditPhotoStoreResponseBody(name='body'),
}

async function editPhotoStoreWithOptions(request: EditPhotoStoreRequest, runtime: Util.RuntimeOptions): EditPhotoStoreResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('EditPhotoStore', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function editPhotoStore(request: EditPhotoStoreRequest): EditPhotoStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return editPhotoStoreWithOptions(request, runtime);
}

model FetchAlbumTagPhotosRequest {
  albumId?: long(name='AlbumId'),
  tagId?: long(name='TagId'),
  size?: int32(name='Size'),
  page?: int32(name='Page'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model FetchAlbumTagPhotosResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      mtime?: long(name='Mtime'),
      state?: string(name='State'),
      photoId?: long(name='PhotoId'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model FetchAlbumTagPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: FetchAlbumTagPhotosResponseBody(name='body'),
}

async function fetchAlbumTagPhotosWithOptions(request: FetchAlbumTagPhotosRequest, runtime: Util.RuntimeOptions): FetchAlbumTagPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('FetchAlbumTagPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function fetchAlbumTagPhotos(request: FetchAlbumTagPhotosRequest): FetchAlbumTagPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return fetchAlbumTagPhotosWithOptions(request, runtime);
}

model FetchLibrariesRequest {
  storeName?: string(name='StoreName'),
  page?: int32(name='Page'),
  size?: int32(name='Size'),
  needQuota?: boolean(name='NeedQuota'),
}

model FetchLibrariesResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  libraries?: [ 
    {
      ctime?: long(name='Ctime'),
      libraryId?: string(name='LibraryId'),
      totalQuota?: long(name='TotalQuota'),
    }
  ](name='Libraries'),
  code?: string(name='Code'),
}

model FetchLibrariesResponse = {
  headers: map[string]string(name='headers'),
  body: FetchLibrariesResponseBody(name='body'),
}

async function fetchLibrariesWithOptions(request: FetchLibrariesRequest, runtime: Util.RuntimeOptions): FetchLibrariesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('FetchLibraries', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function fetchLibraries(request: FetchLibrariesRequest): FetchLibrariesResponse {
  var runtime = new Util.RuntimeOptions{};
  return fetchLibrariesWithOptions(request, runtime);
}

model FetchMomentPhotosRequest {
  momentId?: long(name='MomentId'),
  orderBy?: string(name='OrderBy'),
  order?: string(name='Order'),
  size?: int32(name='Size'),
  page?: int32(name='Page'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model FetchMomentPhotosResponseBody = {
  photos?: [ 
    {
      remark?: string(name='Remark'),
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      height?: long(name='Height'),
      shareExpireTime?: long(name='ShareExpireTime'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      ctime?: long(name='Ctime'),
      mtime?: long(name='Mtime'),
      size?: long(name='Size'),
      width?: long(name='Width'),
      inactiveTime?: long(name='InactiveTime'),
      md5?: string(name='Md5'),
      isVideo?: boolean(name='IsVideo'),
      title?: string(name='Title'),
      location?: string(name='Location'),
      id?: long(name='Id'),
    }
  ](name='Photos'),
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model FetchMomentPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: FetchMomentPhotosResponseBody(name='body'),
}

async function fetchMomentPhotosWithOptions(request: FetchMomentPhotosRequest, runtime: Util.RuntimeOptions): FetchMomentPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('FetchMomentPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function fetchMomentPhotos(request: FetchMomentPhotosRequest): FetchMomentPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return fetchMomentPhotosWithOptions(request, runtime);
}

model FetchPhotosRequest {
  state?: string(name='State'),
  orderBy?: string(name='OrderBy'),
  order?: string(name='Order'),
  size?: int32(name='Size'),
  page?: int32(name='Page'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model FetchPhotosResponseBody = {
  photos?: [ 
    {
      remark?: string(name='Remark'),
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      height?: long(name='Height'),
      shareExpireTime?: long(name='ShareExpireTime'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      ctime?: long(name='Ctime'),
      mtime?: long(name='Mtime'),
      size?: long(name='Size'),
      width?: long(name='Width'),
      inactiveTime?: long(name='InactiveTime'),
      md5?: string(name='Md5'),
      isVideo?: boolean(name='IsVideo'),
      title?: string(name='Title'),
      location?: string(name='Location'),
      id?: long(name='Id'),
    }
  ](name='Photos'),
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model FetchPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: FetchPhotosResponseBody(name='body'),
}

async function fetchPhotosWithOptions(request: FetchPhotosRequest, runtime: Util.RuntimeOptions): FetchPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('FetchPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function fetchPhotos(request: FetchPhotosRequest): FetchPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return fetchPhotosWithOptions(request, runtime);
}

model GetAlbumsByNamesRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  name?: [ string ](name='Name'),
}

model GetAlbumsByNamesResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
  albums?: [ 
    {
      idStr?: string(name='IdStr'),
      photosCount?: long(name='PhotosCount'),
      cover?: {
        remark?: string(name='Remark'),
        state?: string(name='State'),
        height?: long(name='Height'),
        fileId?: string(name='FileId'),
        idStr?: string(name='IdStr'),
        mtime?: long(name='Mtime'),
        ctime?: long(name='Ctime'),
        width?: long(name='Width'),
        md5?: string(name='Md5'),
        isVideo?: boolean(name='IsVideo'),
        title?: string(name='Title'),
        id?: long(name='Id'),
      }(name='Cover'),
      mtime?: long(name='Mtime'),
      ctime?: long(name='Ctime'),
      state?: string(name='State'),
      name?: string(name='Name'),
      id?: long(name='Id'),
    }
  ](name='Albums'),
}

model GetAlbumsByNamesResponse = {
  headers: map[string]string(name='headers'),
  body: GetAlbumsByNamesResponseBody(name='body'),
}

async function getAlbumsByNamesWithOptions(request: GetAlbumsByNamesRequest, runtime: Util.RuntimeOptions): GetAlbumsByNamesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAlbumsByNames', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAlbumsByNames(request: GetAlbumsByNamesRequest): GetAlbumsByNamesResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAlbumsByNamesWithOptions(request, runtime);
}

model GetDownloadUrlRequest {
  photoId?: long(name='PhotoId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model GetDownloadUrlResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
  downloadUrl?: string(name='DownloadUrl'),
}

model GetDownloadUrlResponse = {
  headers: map[string]string(name='headers'),
  body: GetDownloadUrlResponseBody(name='body'),
}

async function getDownloadUrlWithOptions(request: GetDownloadUrlRequest, runtime: Util.RuntimeOptions): GetDownloadUrlResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDownloadUrl', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDownloadUrl(request: GetDownloadUrlRequest): GetDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDownloadUrlWithOptions(request, runtime);
}

model GetDownloadUrlsRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model GetDownloadUrlsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: {
    result?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      downloadUrl?: string(name='DownloadUrl'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      photoId?: long(name='PhotoId'),
    }
  ](name='Result')
  }(name='Results'),
  code?: string(name='Code'),
}

model GetDownloadUrlsResponse = {
  headers: map[string]string(name='headers'),
  body: GetDownloadUrlsResponseBody(name='body'),
}

async function getDownloadUrlsWithOptions(request: GetDownloadUrlsRequest, runtime: Util.RuntimeOptions): GetDownloadUrlsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDownloadUrls', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDownloadUrls(request: GetDownloadUrlsRequest): GetDownloadUrlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDownloadUrlsWithOptions(request, runtime);
}

model GetFramedPhotoUrlsRequest {
  frameId?: string(name='FrameId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model GetFramedPhotoUrlsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: {
    result?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      framedPhotoUrl?: string(name='FramedPhotoUrl'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      photoId?: long(name='PhotoId'),
    }
  ](name='Result')
  }(name='Results'),
  code?: string(name='Code'),
}

model GetFramedPhotoUrlsResponse = {
  headers: map[string]string(name='headers'),
  body: GetFramedPhotoUrlsResponseBody(name='body'),
}

async function getFramedPhotoUrlsWithOptions(request: GetFramedPhotoUrlsRequest, runtime: Util.RuntimeOptions): GetFramedPhotoUrlsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetFramedPhotoUrls', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getFramedPhotoUrls(request: GetFramedPhotoUrlsRequest): GetFramedPhotoUrlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getFramedPhotoUrlsWithOptions(request, runtime);
}

model GetLibraryRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model GetLibraryResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  library?: {
    autoCleanConfig?: {
      autoCleanDays?: int32(name='AutoCleanDays'),
      autoCleanEnabled?: boolean(name='AutoCleanEnabled'),
    }(name='AutoCleanConfig'),
    quota?: {
      photosCount?: int32(name='PhotosCount'),
      totalTrashQuota?: long(name='TotalTrashQuota'),
      inactiveSize?: long(name='InactiveSize'),
      activeSize?: long(name='ActiveSize'),
      facesCount?: int32(name='FacesCount'),
      videosCount?: int32(name='VideosCount'),
      usedQuota?: long(name='UsedQuota'),
      totalQuota?: long(name='TotalQuota'),
    }(name='Quota'),
    ctime?: long(name='Ctime'),
  }(name='Library'),
  code?: string(name='Code'),
}

model GetLibraryResponse = {
  headers: map[string]string(name='headers'),
  body: GetLibraryResponseBody(name='body'),
}

async function getLibraryWithOptions(request: GetLibraryRequest, runtime: Util.RuntimeOptions): GetLibraryResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetLibrary', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getLibrary(request: GetLibraryRequest): GetLibraryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLibraryWithOptions(request, runtime);
}

model GetPhotosRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model GetPhotosResponseBody = {
  photos?: [ 
    {
      remark?: string(name='Remark'),
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      height?: long(name='Height'),
      shareExpireTime?: long(name='ShareExpireTime'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      ctime?: long(name='Ctime'),
      mtime?: long(name='Mtime'),
      width?: long(name='Width'),
      size?: long(name='Size'),
      inactiveTime?: long(name='InactiveTime'),
      md5?: string(name='Md5'),
      isVideo?: boolean(name='IsVideo'),
      title?: string(name='Title'),
      like?: long(name='Like'),
      location?: string(name='Location'),
      id?: long(name='Id'),
    }
  ](name='Photos'),
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model GetPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: GetPhotosResponseBody(name='body'),
}

async function getPhotosWithOptions(request: GetPhotosRequest, runtime: Util.RuntimeOptions): GetPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPhotos(request: GetPhotosRequest): GetPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPhotosWithOptions(request, runtime);
}

model GetPhotosByMd5sRequest {
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  md5?: [ string ](name='Md5'),
}

model GetPhotosByMd5sResponseBody = {
  photos?: [ 
    {
      remark?: string(name='Remark'),
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      height?: long(name='Height'),
      shareExpireTime?: long(name='ShareExpireTime'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      ctime?: long(name='Ctime'),
      mtime?: long(name='Mtime'),
      width?: long(name='Width'),
      size?: long(name='Size'),
      md5?: string(name='Md5'),
      title?: string(name='Title'),
      isVideo?: boolean(name='IsVideo'),
      id?: long(name='Id'),
      location?: string(name='Location'),
    }
  ](name='Photos'),
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model GetPhotosByMd5sResponse = {
  headers: map[string]string(name='headers'),
  body: GetPhotosByMd5sResponseBody(name='body'),
}

async function getPhotosByMd5sWithOptions(request: GetPhotosByMd5sRequest, runtime: Util.RuntimeOptions): GetPhotosByMd5sResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPhotosByMd5s', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPhotosByMd5s(request: GetPhotosByMd5sRequest): GetPhotosByMd5sResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPhotosByMd5sWithOptions(request, runtime);
}

model GetPhotoStoreRequest {
  storeName?: string(name='StoreName'),
}

model GetPhotoStoreResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  photoStore?: {
    autoCleanDays?: int32(name='AutoCleanDays'),
    idStr?: string(name='IdStr'),
    mtime?: long(name='Mtime'),
    ctime?: long(name='Ctime'),
    defaultTrashQuota?: long(name='DefaultTrashQuota'),
    remark?: string(name='Remark'),
    buckets?: [ 
      {
        acl?: string(name='Acl'),
        state?: string(name='State'),
        region?: string(name='Region'),
        name?: string(name='Name'),
      }
    ](name='Buckets'),
    defaultQuota?: long(name='DefaultQuota'),
    name?: string(name='Name'),
    autoCleanEnabled?: boolean(name='AutoCleanEnabled'),
    id?: long(name='Id'),
  }(name='PhotoStore'),
  code?: string(name='Code'),
}

model GetPhotoStoreResponse = {
  headers: map[string]string(name='headers'),
  body: GetPhotoStoreResponseBody(name='body'),
}

async function getPhotoStoreWithOptions(request: GetPhotoStoreRequest, runtime: Util.RuntimeOptions): GetPhotoStoreResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPhotoStore', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPhotoStore(request: GetPhotoStoreRequest): GetPhotoStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPhotoStoreWithOptions(request, runtime);
}

model GetPrivateAccessUrlsRequest {
  zoomType?: string(name='ZoomType'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model GetPrivateAccessUrlsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      photoId?: long(name='PhotoId'),
      accessUrl?: string(name='AccessUrl'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model GetPrivateAccessUrlsResponse = {
  headers: map[string]string(name='headers'),
  body: GetPrivateAccessUrlsResponseBody(name='body'),
}

async function getPrivateAccessUrlsWithOptions(request: GetPrivateAccessUrlsRequest, runtime: Util.RuntimeOptions): GetPrivateAccessUrlsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPrivateAccessUrls', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPrivateAccessUrls(request: GetPrivateAccessUrlsRequest): GetPrivateAccessUrlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPrivateAccessUrlsWithOptions(request, runtime);
}

model GetPublicAccessUrlsRequest {
  zoomType?: string(name='ZoomType'),
  domainType?: string(name='DomainType'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model GetPublicAccessUrlsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      photoId?: long(name='PhotoId'),
      accessUrl?: string(name='AccessUrl'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model GetPublicAccessUrlsResponse = {
  headers: map[string]string(name='headers'),
  body: GetPublicAccessUrlsResponseBody(name='body'),
}

async function getPublicAccessUrlsWithOptions(request: GetPublicAccessUrlsRequest, runtime: Util.RuntimeOptions): GetPublicAccessUrlsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPublicAccessUrls', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPublicAccessUrls(request: GetPublicAccessUrlsRequest): GetPublicAccessUrlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPublicAccessUrlsWithOptions(request, runtime);
}

model GetQuotaRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model GetQuotaResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  quota?: {
    photosCount?: int32(name='PhotosCount'),
    videosCount?: int32(name='VideosCount'),
    facesCount?: int32(name='FacesCount'),
    usedQuota?: long(name='UsedQuota'),
    totalQuota?: long(name='TotalQuota'),
  }(name='Quota'),
  code?: string(name='Code'),
}

model GetQuotaResponse = {
  headers: map[string]string(name='headers'),
  body: GetQuotaResponseBody(name='body'),
}

async function getQuotaWithOptions(request: GetQuotaRequest, runtime: Util.RuntimeOptions): GetQuotaResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetQuota', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getQuota(request: GetQuotaRequest): GetQuotaResponse {
  var runtime = new Util.RuntimeOptions{};
  return getQuotaWithOptions(request, runtime);
}

model GetSimilarPhotosRequest {
  photoId?: long(name='PhotoId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model GetSimilarPhotosResponseBody = {
  photos?: [ 
    {
      remark?: string(name='Remark'),
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      height?: long(name='Height'),
      shareExpireTime?: long(name='ShareExpireTime'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      ctime?: long(name='Ctime'),
      mtime?: long(name='Mtime'),
      size?: long(name='Size'),
      width?: long(name='Width'),
      inactiveTime?: long(name='InactiveTime'),
      md5?: string(name='Md5'),
      isVideo?: boolean(name='IsVideo'),
      title?: string(name='Title'),
      like?: long(name='Like'),
      location?: string(name='Location'),
      id?: long(name='Id'),
    }
  ](name='Photos'),
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model GetSimilarPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: GetSimilarPhotosResponseBody(name='body'),
}

async function getSimilarPhotosWithOptions(request: GetSimilarPhotosRequest, runtime: Util.RuntimeOptions): GetSimilarPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetSimilarPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getSimilarPhotos(request: GetSimilarPhotosRequest): GetSimilarPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSimilarPhotosWithOptions(request, runtime);
}

model GetThumbnailRequest {
  photoId?: long(name='PhotoId'),
  zoomType?: string(name='ZoomType'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model GetThumbnailResponseBody = {
  action?: string(name='Action'),
  thumbnailUrl?: string(name='ThumbnailUrl'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model GetThumbnailResponse = {
  headers: map[string]string(name='headers'),
  body: GetThumbnailResponseBody(name='body'),
}

async function getThumbnailWithOptions(request: GetThumbnailRequest, runtime: Util.RuntimeOptions): GetThumbnailResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetThumbnail', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getThumbnail(request: GetThumbnailRequest): GetThumbnailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getThumbnailWithOptions(request, runtime);
}

model GetThumbnailsRequest {
  zoomType?: string(name='ZoomType'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model GetThumbnailsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: {
    result?: [ 
    {
      thumbnailUrl?: string(name='ThumbnailUrl'),
      photoIdStr?: string(name='PhotoIdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      photoId?: long(name='PhotoId'),
    }
  ](name='Result')
  }(name='Results'),
  code?: string(name='Code'),
}

model GetThumbnailsResponse = {
  headers: map[string]string(name='headers'),
  body: GetThumbnailsResponseBody(name='body'),
}

async function getThumbnailsWithOptions(request: GetThumbnailsRequest, runtime: Util.RuntimeOptions): GetThumbnailsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetThumbnails', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getThumbnails(request: GetThumbnailsRequest): GetThumbnailsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getThumbnailsWithOptions(request, runtime);
}

model GetVideoCoverRequest {
  photoId?: long(name='PhotoId'),
  zoomType?: string(name='ZoomType'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model GetVideoCoverResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  videoCoverUrl?: string(name='VideoCoverUrl'),
  code?: string(name='Code'),
}

model GetVideoCoverResponse = {
  headers: map[string]string(name='headers'),
  body: GetVideoCoverResponseBody(name='body'),
}

async function getVideoCoverWithOptions(request: GetVideoCoverRequest, runtime: Util.RuntimeOptions): GetVideoCoverResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetVideoCover', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getVideoCover(request: GetVideoCoverRequest): GetVideoCoverResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVideoCoverWithOptions(request, runtime);
}

model InactivatePhotosRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  inactiveTime?: long(name='InactiveTime'),
  photoId?: [ integer ](name='PhotoId'),
}

model InactivatePhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model InactivatePhotosResponse = {
  headers: map[string]string(name='headers'),
  body: InactivatePhotosResponseBody(name='body'),
}

async function inactivatePhotosWithOptions(request: InactivatePhotosRequest, runtime: Util.RuntimeOptions): InactivatePhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('InactivatePhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function inactivatePhotos(request: InactivatePhotosRequest): InactivatePhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return inactivatePhotosWithOptions(request, runtime);
}

model LikePhotoRequest {
  photoId?: long(name='PhotoId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model LikePhotoResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model LikePhotoResponse = {
  headers: map[string]string(name='headers'),
  body: LikePhotoResponseBody(name='body'),
}

async function likePhotoWithOptions(request: LikePhotoRequest, runtime: Util.RuntimeOptions): LikePhotoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('LikePhoto', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function likePhoto(request: LikePhotoRequest): LikePhotoResponse {
  var runtime = new Util.RuntimeOptions{};
  return likePhotoWithOptions(request, runtime);
}

model ListAlbumPhotosRequest {
  albumId?: long(name='AlbumId'),
  direction?: string(name='Direction'),
  size?: int32(name='Size'),
  cursor?: string(name='Cursor'),
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListAlbumPhotosResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  nextCursor?: string(name='NextCursor'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  results?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      mtime?: long(name='Mtime'),
      state?: string(name='State'),
      photoId?: long(name='PhotoId'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model ListAlbumPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: ListAlbumPhotosResponseBody(name='body'),
}

async function listAlbumPhotosWithOptions(request: ListAlbumPhotosRequest, runtime: Util.RuntimeOptions): ListAlbumPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListAlbumPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listAlbumPhotos(request: ListAlbumPhotosRequest): ListAlbumPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAlbumPhotosWithOptions(request, runtime);
}

model ListAlbumsRequest {
  direction?: string(name='Direction'),
  size?: int32(name='Size'),
  cursor?: string(name='Cursor'),
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListAlbumsResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  nextCursor?: string(name='NextCursor'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  code?: string(name='Code'),
  albums?: [ 
    {
      idStr?: string(name='IdStr'),
      photosCount?: long(name='PhotosCount'),
      cover?: {
        remark?: string(name='Remark'),
        state?: string(name='State'),
        height?: long(name='Height'),
        fileId?: string(name='FileId'),
        idStr?: string(name='IdStr'),
        mtime?: long(name='Mtime'),
        ctime?: long(name='Ctime'),
        width?: long(name='Width'),
        md5?: string(name='Md5'),
        isVideo?: boolean(name='IsVideo'),
        title?: string(name='Title'),
        id?: long(name='Id'),
      }(name='Cover'),
      mtime?: long(name='Mtime'),
      ctime?: long(name='Ctime'),
      remark?: string(name='Remark'),
      state?: string(name='State'),
      name?: string(name='Name'),
      id?: long(name='Id'),
    }
  ](name='Albums'),
}

model ListAlbumsResponse = {
  headers: map[string]string(name='headers'),
  body: ListAlbumsResponseBody(name='body'),
}

async function listAlbumsWithOptions(request: ListAlbumsRequest, runtime: Util.RuntimeOptions): ListAlbumsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListAlbums', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listAlbums(request: ListAlbumsRequest): ListAlbumsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAlbumsWithOptions(request, runtime);
}

model ListFacePhotosRequest {
  faceId?: long(name='FaceId'),
  direction?: string(name='Direction'),
  size?: int32(name='Size'),
  cursor?: string(name='Cursor'),
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListFacePhotosResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  nextCursor?: string(name='NextCursor'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  results?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      mtime?: long(name='Mtime'),
      state?: string(name='State'),
      photoId?: long(name='PhotoId'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model ListFacePhotosResponse = {
  headers: map[string]string(name='headers'),
  body: ListFacePhotosResponseBody(name='body'),
}

async function listFacePhotosWithOptions(request: ListFacePhotosRequest, runtime: Util.RuntimeOptions): ListFacePhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListFacePhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listFacePhotos(request: ListFacePhotosRequest): ListFacePhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFacePhotosWithOptions(request, runtime);
}

model ListFacesRequest {
  direction?: string(name='Direction'),
  size?: int32(name='Size'),
  cursor?: string(name='Cursor'),
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  hasFaceName?: string(name='HasFaceName'),
}

model ListFacesResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  nextCursor?: string(name='NextCursor'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  code?: string(name='Code'),
  faces?: [ 
    {
      idStr?: string(name='IdStr'),
      photosCount?: int32(name='PhotosCount'),
      isMe?: boolean(name='IsMe'),
      cover?: {
        remark?: string(name='Remark'),
        state?: string(name='State'),
        height?: long(name='Height'),
        fileId?: string(name='FileId'),
        idStr?: string(name='IdStr'),
        mtime?: long(name='Mtime'),
        ctime?: long(name='Ctime'),
        width?: long(name='Width'),
        md5?: string(name='Md5'),
        isVideo?: boolean(name='IsVideo'),
        title?: string(name='Title'),
        id?: long(name='Id'),
      }(name='Cover'),
      mtime?: long(name='Mtime'),
      ctime?: long(name='Ctime'),
      state?: string(name='State'),
      axis?: [ string ](name='Axis'),
      name?: string(name='Name'),
      id?: long(name='Id'),
    }
  ](name='Faces'),
}

model ListFacesResponse = {
  headers: map[string]string(name='headers'),
  body: ListFacesResponseBody(name='body'),
}

async function listFacesWithOptions(request: ListFacesRequest, runtime: Util.RuntimeOptions): ListFacesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListFaces', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listFaces(request: ListFacesRequest): ListFacesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFacesWithOptions(request, runtime);
}

model ListMomentPhotosRequest {
  momentId?: long(name='MomentId'),
  direction?: string(name='Direction'),
  size?: int32(name='Size'),
  cursor?: string(name='Cursor'),
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListMomentPhotosResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  nextCursor?: string(name='NextCursor'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  results?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      state?: string(name='State'),
      photoId?: long(name='PhotoId'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model ListMomentPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: ListMomentPhotosResponseBody(name='body'),
}

async function listMomentPhotosWithOptions(request: ListMomentPhotosRequest, runtime: Util.RuntimeOptions): ListMomentPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListMomentPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listMomentPhotos(request: ListMomentPhotosRequest): ListMomentPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMomentPhotosWithOptions(request, runtime);
}

model ListMomentsRequest {
  direction?: string(name='Direction'),
  size?: int32(name='Size'),
  cursor?: string(name='Cursor'),
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListMomentsResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  nextCursor?: string(name='NextCursor'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  moments?: [ 
    {
      idStr?: string(name='IdStr'),
      photosCount?: int32(name='PhotosCount'),
      mtime?: long(name='Mtime'),
      ctime?: long(name='Ctime'),
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      locationName?: string(name='LocationName'),
      id?: long(name='Id'),
    }
  ](name='Moments'),
  code?: string(name='Code'),
}

model ListMomentsResponse = {
  headers: map[string]string(name='headers'),
  body: ListMomentsResponseBody(name='body'),
}

async function listMomentsWithOptions(request: ListMomentsRequest, runtime: Util.RuntimeOptions): ListMomentsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListMoments', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listMoments(request: ListMomentsRequest): ListMomentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMomentsWithOptions(request, runtime);
}

model ListPhotoFacesRequest {
  photoId?: long(name='PhotoId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListPhotoFacesResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
  faces?: [ 
    {
      faceIdStr?: string(name='FaceIdStr'),
      faceName?: string(name='FaceName'),
      faceId?: long(name='FaceId'),
      axis?: [ string ](name='Axis'),
    }
  ](name='Faces'),
}

model ListPhotoFacesResponse = {
  headers: map[string]string(name='headers'),
  body: ListPhotoFacesResponseBody(name='body'),
}

async function listPhotoFacesWithOptions(request: ListPhotoFacesRequest, runtime: Util.RuntimeOptions): ListPhotoFacesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListPhotoFaces', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPhotoFaces(request: ListPhotoFacesRequest): ListPhotoFacesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPhotoFacesWithOptions(request, runtime);
}

model ListPhotosRequest {
  direction?: string(name='Direction'),
  size?: int32(name='Size'),
  cursor?: string(name='Cursor'),
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListPhotosResponseBody = {
  photos?: [ 
    {
      remark?: string(name='Remark'),
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      height?: long(name='Height'),
      shareExpireTime?: long(name='ShareExpireTime'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      ctime?: long(name='Ctime'),
      mtime?: long(name='Mtime'),
      size?: long(name='Size'),
      width?: long(name='Width'),
      inactiveTime?: long(name='InactiveTime'),
      md5?: string(name='Md5'),
      isVideo?: boolean(name='IsVideo'),
      title?: string(name='Title'),
      location?: string(name='Location'),
      id?: long(name='Id'),
    }
  ](name='Photos'),
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  nextCursor?: string(name='NextCursor'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  code?: string(name='Code'),
}

model ListPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: ListPhotosResponseBody(name='body'),
}

async function listPhotosWithOptions(request: ListPhotosRequest, runtime: Util.RuntimeOptions): ListPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPhotos(request: ListPhotosRequest): ListPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPhotosWithOptions(request, runtime);
}

model ListPhotoStoresResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  photoStores?: [ 
    {
      autoCleanDays?: int32(name='AutoCleanDays'),
      idStr?: string(name='IdStr'),
      mtime?: long(name='Mtime'),
      ctime?: long(name='Ctime'),
      remark?: string(name='Remark'),
      buckets?: [ 
        {
          state?: string(name='State'),
          region?: string(name='Region'),
          name?: string(name='Name'),
        }
      ](name='Buckets'),
      defaultQuota?: long(name='DefaultQuota'),
      name?: string(name='Name'),
      autoCleanEnabled?: boolean(name='AutoCleanEnabled'),
      id?: long(name='Id'),
    }
  ](name='PhotoStores'),
  code?: string(name='Code'),
}

model ListPhotoStoresResponse = {
  headers: map[string]string(name='headers'),
  body: ListPhotoStoresResponseBody(name='body'),
}

async function listPhotoStoresWithOptions(runtime: Util.RuntimeOptions): ListPhotoStoresResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('ListPhotoStores', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPhotoStores(): ListPhotoStoresResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPhotoStoresWithOptions(runtime);
}

model ListPhotoTagsRequest {
  photoId?: long(name='PhotoId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  lang?: string(name='Lang'),
}

model ListPhotoTagsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
  tags?: [ 
    {
      idStr?: string(name='IdStr'),
      isSubTag?: boolean(name='IsSubTag'),
      name?: string(name='Name'),
      parentTag?: string(name='ParentTag'),
      id?: long(name='Id'),
    }
  ](name='Tags'),
}

model ListPhotoTagsResponse = {
  headers: map[string]string(name='headers'),
  body: ListPhotoTagsResponseBody(name='body'),
}

async function listPhotoTagsWithOptions(request: ListPhotoTagsRequest, runtime: Util.RuntimeOptions): ListPhotoTagsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListPhotoTags', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPhotoTags(request: ListPhotoTagsRequest): ListPhotoTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPhotoTagsWithOptions(request, runtime);
}

model ListRegisteredTagsRequest {
  storeName?: string(name='StoreName'),
  lang?: [ string ](name='Lang'),
}

model ListRegisteredTagsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  registeredTags?: [ 
    {
      tagValues?: [ 
        {
          lang?: string(name='Lang'),
          text?: string(name='Text'),
        }
      ](name='TagValues'),
      tagKey?: string(name='TagKey'),
    }
  ](name='RegisteredTags'),
  code?: string(name='Code'),
}

model ListRegisteredTagsResponse = {
  headers: map[string]string(name='headers'),
  body: ListRegisteredTagsResponseBody(name='body'),
}

async function listRegisteredTagsWithOptions(request: ListRegisteredTagsRequest, runtime: Util.RuntimeOptions): ListRegisteredTagsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListRegisteredTags', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listRegisteredTags(request: ListRegisteredTagsRequest): ListRegisteredTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRegisteredTagsWithOptions(request, runtime);
}

model ListTagPhotosRequest {
  tagId?: long(name='TagId'),
  direction?: string(name='Direction'),
  size?: int32(name='Size'),
  cursor?: string(name='Cursor'),
  state?: string(name='State'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListTagPhotosResponseBody = {
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  nextCursor?: string(name='NextCursor'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  results?: [ 
    {
      photoIdStr?: string(name='PhotoIdStr'),
      state?: string(name='State'),
      photoId?: long(name='PhotoId'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model ListTagPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: ListTagPhotosResponseBody(name='body'),
}

async function listTagPhotosWithOptions(request: ListTagPhotosRequest, runtime: Util.RuntimeOptions): ListTagPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListTagPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listTagPhotos(request: ListTagPhotosRequest): ListTagPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagPhotosWithOptions(request, runtime);
}

model ListTagsRequest {
  lang?: string(name='Lang'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListTagsResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
  tags?: [ 
    {
      idStr?: string(name='IdStr'),
      cover?: {
        remark?: string(name='Remark'),
        state?: string(name='State'),
        height?: long(name='Height'),
        fileId?: string(name='FileId'),
        idStr?: string(name='IdStr'),
        mtime?: long(name='Mtime'),
        ctime?: long(name='Ctime'),
        width?: long(name='Width'),
        md5?: string(name='Md5'),
        isVideo?: boolean(name='IsVideo'),
        title?: string(name='Title'),
        id?: long(name='Id'),
      }(name='Cover'),
      isSubTag?: boolean(name='IsSubTag'),
      name?: string(name='Name'),
      parentTag?: string(name='ParentTag'),
      id?: long(name='Id'),
    }
  ](name='Tags'),
}

model ListTagsResponse = {
  headers: map[string]string(name='headers'),
  body: ListTagsResponseBody(name='body'),
}

async function listTagsWithOptions(request: ListTagsRequest, runtime: Util.RuntimeOptions): ListTagsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListTags', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listTags(request: ListTagsRequest): ListTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagsWithOptions(request, runtime);
}

model ListTimeLinePhotosRequest {
  direction?: string(name='Direction'),
  page?: int32(name='Page'),
  size?: int32(name='Size'),
  startTime?: long(name='StartTime'),
  endTime?: long(name='EndTime'),
  filterBy?: string(name='FilterBy'),
  order?: string(name='Order'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListTimeLinePhotosResponseBody = {
  photos?: [ 
    {
      remark?: string(name='Remark'),
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      height?: long(name='Height'),
      shareExpireTime?: long(name='ShareExpireTime'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      ctime?: long(name='Ctime'),
      mtime?: long(name='Mtime'),
      size?: long(name='Size'),
      width?: long(name='Width'),
      md5?: string(name='Md5'),
      isVideo?: boolean(name='IsVideo'),
      title?: string(name='Title'),
      like?: long(name='Like'),
      location?: string(name='Location'),
      id?: long(name='Id'),
    }
  ](name='Photos'),
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model ListTimeLinePhotosResponse = {
  headers: map[string]string(name='headers'),
  body: ListTimeLinePhotosResponseBody(name='body'),
}

async function listTimeLinePhotosWithOptions(request: ListTimeLinePhotosRequest, runtime: Util.RuntimeOptions): ListTimeLinePhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListTimeLinePhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listTimeLinePhotos(request: ListTimeLinePhotosRequest): ListTimeLinePhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTimeLinePhotosWithOptions(request, runtime);
}

model ListTimeLinesRequest {
  direction?: string(name='Direction'),
  photoSize?: int32(name='PhotoSize'),
  cursor?: long(name='Cursor'),
  timeLineCount?: int32(name='TimeLineCount'),
  timeLineUnit?: string(name='TimeLineUnit'),
  filterBy?: string(name='FilterBy'),
  order?: string(name='Order'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model ListTimeLinesResponseBody = {
  action?: string(name='Action'),
  nextCursor?: int32(name='NextCursor'),
  timeLines?: [ 
    {
      endTime?: long(name='EndTime'),
      photosCount?: int32(name='PhotosCount'),
      startTime?: long(name='StartTime'),
      photos?: [ 
        {
          remark?: string(name='Remark'),
          takenAt?: long(name='TakenAt'),
          state?: string(name='State'),
          height?: long(name='Height'),
          shareExpireTime?: long(name='ShareExpireTime'),
          fileId?: string(name='FileId'),
          idStr?: string(name='IdStr'),
          ctime?: long(name='Ctime'),
          mtime?: long(name='Mtime'),
          size?: long(name='Size'),
          width?: long(name='Width'),
          md5?: string(name='Md5'),
          isVideo?: boolean(name='IsVideo'),
          title?: string(name='Title'),
          like?: long(name='Like'),
          location?: string(name='Location'),
          id?: long(name='Id'),
        }
      ](name='Photos'),
      totalCount?: int32(name='TotalCount'),
    }
  ](name='TimeLines'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model ListTimeLinesResponse = {
  headers: map[string]string(name='headers'),
  body: ListTimeLinesResponseBody(name='body'),
}

async function listTimeLinesWithOptions(request: ListTimeLinesRequest, runtime: Util.RuntimeOptions): ListTimeLinesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListTimeLines', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listTimeLines(request: ListTimeLinesRequest): ListTimeLinesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTimeLinesWithOptions(request, runtime);
}

model MergeFacesRequest {
  targetFaceId?: long(name='TargetFaceId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  faceId?: [ integer ](name='FaceId'),
}

model MergeFacesResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: {
    result?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Result')
  }(name='Results'),
  code?: string(name='Code'),
}

model MergeFacesResponse = {
  headers: map[string]string(name='headers'),
  body: MergeFacesResponseBody(name='body'),
}

async function mergeFacesWithOptions(request: MergeFacesRequest, runtime: Util.RuntimeOptions): MergeFacesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('MergeFaces', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function mergeFaces(request: MergeFacesRequest): MergeFacesResponse {
  var runtime = new Util.RuntimeOptions{};
  return mergeFacesWithOptions(request, runtime);
}

model MoveAlbumPhotosRequest {
  sourceAlbumId?: long(name='SourceAlbumId'),
  targetAlbumId?: long(name='TargetAlbumId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model MoveAlbumPhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model MoveAlbumPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: MoveAlbumPhotosResponseBody(name='body'),
}

async function moveAlbumPhotosWithOptions(request: MoveAlbumPhotosRequest, runtime: Util.RuntimeOptions): MoveAlbumPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('MoveAlbumPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function moveAlbumPhotos(request: MoveAlbumPhotosRequest): MoveAlbumPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return moveAlbumPhotosWithOptions(request, runtime);
}

model MoveFacePhotosRequest {
  sourceFaceId?: long(name='SourceFaceId'),
  targetFaceId?: long(name='TargetFaceId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model MoveFacePhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model MoveFacePhotosResponse = {
  headers: map[string]string(name='headers'),
  body: MoveFacePhotosResponseBody(name='body'),
}

async function moveFacePhotosWithOptions(request: MoveFacePhotosRequest, runtime: Util.RuntimeOptions): MoveFacePhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('MoveFacePhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function moveFacePhotos(request: MoveFacePhotosRequest): MoveFacePhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return moveFacePhotosWithOptions(request, runtime);
}

model ReactivatePhotosRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model ReactivatePhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model ReactivatePhotosResponse = {
  headers: map[string]string(name='headers'),
  body: ReactivatePhotosResponseBody(name='body'),
}

async function reactivatePhotosWithOptions(request: ReactivatePhotosRequest, runtime: Util.RuntimeOptions): ReactivatePhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ReactivatePhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function reactivatePhotos(request: ReactivatePhotosRequest): ReactivatePhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return reactivatePhotosWithOptions(request, runtime);
}

model RegisterPhotoRequest {
  takenAt?: long(name='TakenAt'),
  location?: string(name='Location'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  latitude?: float(name='Latitude'),
  longitude?: float(name='Longitude'),
  width?: int32(name='Width'),
  height?: int32(name='Height'),
  isVideo?: string(name='IsVideo'),
  md5?: string(name='Md5'),
  size?: long(name='Size'),
  photoTitle?: string(name='PhotoTitle'),
  remark?: string(name='Remark'),
}

model RegisterPhotoResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  photo?: {
    remark?: string(name='Remark'),
    takenAt?: long(name='TakenAt'),
    state?: string(name='State'),
    height?: long(name='Height'),
    shareExpireTime?: long(name='ShareExpireTime'),
    fileId?: string(name='FileId'),
    idStr?: string(name='IdStr'),
    ctime?: long(name='Ctime'),
    mtime?: long(name='Mtime'),
    width?: long(name='Width'),
    size?: long(name='Size'),
    md5?: string(name='Md5'),
    title?: string(name='Title'),
    isVideo?: boolean(name='IsVideo'),
    id?: long(name='Id'),
    location?: string(name='Location'),
  }(name='Photo'),
  code?: string(name='Code'),
}

model RegisterPhotoResponse = {
  headers: map[string]string(name='headers'),
  body: RegisterPhotoResponseBody(name='body'),
}

async function registerPhotoWithOptions(request: RegisterPhotoRequest, runtime: Util.RuntimeOptions): RegisterPhotoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RegisterPhoto', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function registerPhoto(request: RegisterPhotoRequest): RegisterPhotoResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerPhotoWithOptions(request, runtime);
}

model RegisterTagRequest {
  storeName?: string(name='StoreName'),
  tagKey?: string(name='TagKey'),
  lang?: string(name='Lang'),
  text?: string(name='Text'),
}

model RegisterTagResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model RegisterTagResponse = {
  headers: map[string]string(name='headers'),
  body: RegisterTagResponseBody(name='body'),
}

async function registerTagWithOptions(request: RegisterTagRequest, runtime: Util.RuntimeOptions): RegisterTagResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RegisterTag', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function registerTag(request: RegisterTagRequest): RegisterTagResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerTagWithOptions(request, runtime);
}

model RemoveAlbumPhotosRequest {
  albumId?: long(name='AlbumId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model RemoveAlbumPhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model RemoveAlbumPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: RemoveAlbumPhotosResponseBody(name='body'),
}

async function removeAlbumPhotosWithOptions(request: RemoveAlbumPhotosRequest, runtime: Util.RuntimeOptions): RemoveAlbumPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RemoveAlbumPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function removeAlbumPhotos(request: RemoveAlbumPhotosRequest): RemoveAlbumPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeAlbumPhotosWithOptions(request, runtime);
}

model RemoveFacePhotosRequest {
  faceId?: long(name='FaceId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: [ integer ](name='PhotoId'),
}

model RemoveFacePhotosResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  results?: [ 
    {
      idStr?: string(name='IdStr'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: long(name='Id'),
    }
  ](name='Results'),
  code?: string(name='Code'),
}

model RemoveFacePhotosResponse = {
  headers: map[string]string(name='headers'),
  body: RemoveFacePhotosResponseBody(name='body'),
}

async function removeFacePhotosWithOptions(request: RemoveFacePhotosRequest, runtime: Util.RuntimeOptions): RemoveFacePhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RemoveFacePhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function removeFacePhotos(request: RemoveFacePhotosRequest): RemoveFacePhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeFacePhotosWithOptions(request, runtime);
}

model RenameAlbumRequest {
  albumId?: long(name='AlbumId'),
  albumName?: string(name='AlbumName'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model RenameAlbumResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model RenameAlbumResponse = {
  headers: map[string]string(name='headers'),
  body: RenameAlbumResponseBody(name='body'),
}

async function renameAlbumWithOptions(request: RenameAlbumRequest, runtime: Util.RuntimeOptions): RenameAlbumResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RenameAlbum', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function renameAlbum(request: RenameAlbumRequest): RenameAlbumResponse {
  var runtime = new Util.RuntimeOptions{};
  return renameAlbumWithOptions(request, runtime);
}

model RenameFaceRequest {
  faceId?: long(name='FaceId'),
  faceName?: string(name='FaceName'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model RenameFaceResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model RenameFaceResponse = {
  headers: map[string]string(name='headers'),
  body: RenameFaceResponseBody(name='body'),
}

async function renameFaceWithOptions(request: RenameFaceRequest, runtime: Util.RuntimeOptions): RenameFaceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RenameFace', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function renameFace(request: RenameFaceRequest): RenameFaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return renameFaceWithOptions(request, runtime);
}

model SearchPhotosRequest {
  page?: int32(name='Page'),
  size?: int32(name='Size'),
  keyword?: string(name='Keyword'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model SearchPhotosResponseBody = {
  photos?: [ 
    {
      takenAt?: long(name='TakenAt'),
      state?: string(name='State'),
      height?: long(name='Height'),
      shareExpireTime?: long(name='ShareExpireTime'),
      fileId?: string(name='FileId'),
      idStr?: string(name='IdStr'),
      ctime?: long(name='Ctime'),
      mtime?: long(name='Mtime'),
      width?: long(name='Width'),
      size?: long(name='Size'),
      md5?: string(name='Md5'),
      title?: string(name='Title'),
      isVideo?: boolean(name='IsVideo'),
      id?: long(name='Id'),
      location?: string(name='Location'),
    }
  ](name='Photos'),
  action?: string(name='Action'),
  totalCount?: int32(name='TotalCount'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model SearchPhotosResponse = {
  headers: map[string]string(name='headers'),
  body: SearchPhotosResponseBody(name='body'),
}

async function searchPhotosWithOptions(request: SearchPhotosRequest, runtime: Util.RuntimeOptions): SearchPhotosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SearchPhotos', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function searchPhotos(request: SearchPhotosRequest): SearchPhotosResponse {
  var runtime = new Util.RuntimeOptions{};
  return searchPhotosWithOptions(request, runtime);
}

model SetAlbumCoverRequest {
  albumId?: long(name='AlbumId'),
  photoId?: long(name='PhotoId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model SetAlbumCoverResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model SetAlbumCoverResponse = {
  headers: map[string]string(name='headers'),
  body: SetAlbumCoverResponseBody(name='body'),
}

async function setAlbumCoverWithOptions(request: SetAlbumCoverRequest, runtime: Util.RuntimeOptions): SetAlbumCoverResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SetAlbumCover', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function setAlbumCover(request: SetAlbumCoverRequest): SetAlbumCoverResponse {
  var runtime = new Util.RuntimeOptions{};
  return setAlbumCoverWithOptions(request, runtime);
}

model SetFaceCoverRequest {
  faceId?: long(name='FaceId'),
  photoId?: long(name='PhotoId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model SetFaceCoverResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model SetFaceCoverResponse = {
  headers: map[string]string(name='headers'),
  body: SetFaceCoverResponseBody(name='body'),
}

async function setFaceCoverWithOptions(request: SetFaceCoverRequest, runtime: Util.RuntimeOptions): SetFaceCoverResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SetFaceCover', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function setFaceCover(request: SetFaceCoverRequest): SetFaceCoverResponse {
  var runtime = new Util.RuntimeOptions{};
  return setFaceCoverWithOptions(request, runtime);
}

model SetMeRequest {
  faceId?: long(name='FaceId'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model SetMeResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model SetMeResponse = {
  headers: map[string]string(name='headers'),
  body: SetMeResponseBody(name='body'),
}

async function setMeWithOptions(request: SetMeRequest, runtime: Util.RuntimeOptions): SetMeResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SetMe', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function setMe(request: SetMeRequest): SetMeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setMeWithOptions(request, runtime);
}

model SetQuotaRequest {
  totalQuota?: long(name='TotalQuota'),
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
}

model SetQuotaResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model SetQuotaResponse = {
  headers: map[string]string(name='headers'),
  body: SetQuotaResponseBody(name='body'),
}

async function setQuotaWithOptions(request: SetQuotaRequest, runtime: Util.RuntimeOptions): SetQuotaResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SetQuota', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function setQuota(request: SetQuotaRequest): SetQuotaResponse {
  var runtime = new Util.RuntimeOptions{};
  return setQuotaWithOptions(request, runtime);
}

model TagPhotoRequest {
  storeName?: string(name='StoreName'),
  libraryId?: string(name='LibraryId'),
  photoId?: long(name='PhotoId'),
  tagKey?: [ string ](name='TagKey'),
  confidence?: [ number ](name='Confidence'),
}

model TagPhotoResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model TagPhotoResponse = {
  headers: map[string]string(name='headers'),
  body: TagPhotoResponseBody(name='body'),
}

async function tagPhotoWithOptions(request: TagPhotoRequest, runtime: Util.RuntimeOptions): TagPhotoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('TagPhoto', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function tagPhoto(request: TagPhotoRequest): TagPhotoResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagPhotoWithOptions(request, runtime);
}

model ToggleFeaturesRequest {
  storeName?: string(name='StoreName'),
  enabledFeatures?: [ string ](name='EnabledFeatures'),
  disabledFeatures?: [ string ](name='DisabledFeatures'),
}

model ToggleFeaturesResponseBody = {
  action?: string(name='Action'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  code?: string(name='Code'),
}

model ToggleFeaturesResponse = {
  headers: map[string]string(name='headers'),
  body: ToggleFeaturesResponseBody(name='body'),
}

async function toggleFeaturesWithOptions(request: ToggleFeaturesRequest, runtime: Util.RuntimeOptions): ToggleFeaturesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ToggleFeatures', '2017-07-11', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function toggleFeatures(request: ToggleFeaturesRequest): ToggleFeaturesResponse {
  var runtime = new Util.RuntimeOptions{};
  return toggleFeaturesWithOptions(request, runtime);
}

